﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SMTC.BO.UserPower;
using System.Data;
using SMTC.WebCommon.Common;

public partial class UserPower_NewsDetail : BasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
           
            string newid = Request.QueryString["NewID"].ToString();
            NewsDetail detail = new NewsDetail();
            DataSet set = detail.SELECT_News_Detail(newid);
            string ImportantLevel = set.Tables[0].Rows[0]["PubLevel"].ToString();
            switch (ImportantLevel)
            {
                case "0": LabelImport.Text =Resources.Resource.General;// "一般";
                    break;
                case "1": LabelImport.Text = Resources.Resource.Important;//"重要";
                    break;
                case "2": LabelImport.Text = Resources.Resource.Urgent;//"紧急";
                    break ;       
            }
            LabelTitle.Text = set.Tables[0].Rows[0]["NewsTitle"].ToString();
            LabelPublishName.Text = set.Tables[0].Rows[0]["PublishUser"].ToString();
            LabelTime.Text =Convert .ToDateTime(set.Tables[0].Rows[0]["PublishDateTime"]).ToString("yyyy-MM-dd HH:mm");
           // TextBoxReceiver.Text = set.Tables[0].Rows[0]["ReSUser"].ToString();
            LabelContent.Text= set.Tables[0].Rows[0]["NewsContent"].ToString();
            
        }
    }
}